package com.webmarmun;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class AndredActivity extends Activity  {

	@Override
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.uverenja);
		Button b1 =(Button)findViewById(R.id.button1);
	    Button b2 =(Button)findViewById(R.id.button2);
	    Button b3 =(Button)findViewById(R.id.button3);
	    Button b4 =(Button)findViewById(R.id.button4);

		
	    b1.setOnClickListener(buttonhandler);
	    b2.setOnClickListener(buttonhandler);   
	    b3.setOnClickListener(buttonhandler);
	    b4.setOnClickListener(buttonhandler);


	}
	
	 View.OnClickListener buttonhandler=new View.OnClickListener() { 

		   // Now I need to determine which button was clicked, and which intent or activity to launch.         
		      public void onClick(View v) {
		   switch(v.getId()) { 

		 // Now, which button did they press, and take me to that class/activity

		       case R.id.button1:    //<<---- notice end line with colon, not a semicolon
		          Intent myIntent1 = new Intent(AndredActivity.this, Nekaznjavanje.class);
		          AndredActivity.this.startActivity(myIntent1);
		      break;

		       case R.id.button2:    //<<---- notice end line with colon, not a semicolon
		          Intent myIntent2 = new Intent(AndredActivity.this, Roditeljskopravo.class);
		          AndredActivity.this.startActivity(myIntent2);
		      break;  

		       case R.id.button3:  
		                Intent myIntent3 = new Intent(AndredActivity.this, Poslovnasposobnost.class);
		                AndredActivity.this.startActivity(myIntent3);
		      break;   
		      
		       case R.id.button4:  
	                Intent myIntent4 = new Intent(AndredActivity.this, Brakorazvod.class);
	                AndredActivity.this.startActivity(myIntent4);
	      break;   

		       } 
		    } 
		};
		   

	
	
}